package Task;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Demo {
    //删除公共字符
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String str1 = in.next();
            String str2 = in.next();
            String ret = removeStrings(str1,str2);
            //System.out.println("ssssss");
            System.out.println(ret);
        }
    }
    public static String removeStrings(String s1,String s2){
        //利用set的去重性来做
        Set<Character> set = new HashSet<>();
        for (int i = 0; i < s2.length(); i++) {
            set.add(s2.charAt(i));
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < s1.length(); i++) {
            if(!set.contains(s1.charAt(i))){
                stringBuilder.append(s1.charAt(i));
            }
        }
        return stringBuilder.toString();
    }
}